import java.util.Comparator;
import java.util.PriorityQueue;



abstract class Preson{
    public abstract void fun2();
}
public class Test {
    public static void main(String[] args) {
        PriorityQueue<Integer>priorityQueue=new PriorityQueue<>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o2-o1;
            }
        });

        PriorityQueue<Integer>priorityQueue1=new PriorityQueue<>((o1, o2) ->o2-o1 );

        Preson preson=new Preson() {
            @Override
            public void fun2() {
                System.out.println("Preson的方法");
            }
        };
        preson.fun2();

    }
}
